package jk.fox.serializable;

/**
 * @author cuichao
 * @Description: Serialization
 * @Date: create in 2020/3/30 23:57
 */
public interface Serialization {
    /**
     * 序列化
     * @param object
     * @return
     */
    byte[] serialize(Object object);
    /**
     * 反序列化
     * @param bytes
     * @param targetClass
     * @param <T>
     * @return
     */
    <T>T deserialize(byte[] bytes,Class<T> targetClass);
    /**
     * 得到Content-Type
     * @return
     */
    String getContentType();


}
